home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-17 | 9.7 KB | 297 lines | [TEXT/MPS ] |
- #
- # ****************************************************************************
- #
- # File Name: Quicken.vu
- #
- # Contains: Quick look test script for Quicken version 3.0
- #
- # Written by: Kevin Avoy, Ken Landreth, Michael Leong, Gil Spencer et al
- #
- # Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
- #
- # ****************************************************************************
- # C h a n g e H i s t o r y (most recent first):
- # ****************************************************************************
- #
- # Vers Date Author Description
- # ---- -------- ------ ---------------------------------------------
- # <1.0.7> 12/14/93 KTA Dealt with some problems that happen when running script for the
- # first time.
- # <1.0.6> 12/13/93 KTA Changed call to DoSetUpApp() 1st paramter from 'No' to 'Cancel'
- # <1.0.5> 9/30/93 KTA Initialize gFileName prior to gApptitle being updated by
- # launchTwitch().
- # <1.0.2> 6/16/93 NAGA Renaming InitGlobals(ScriptLevel)to InitGlobals(ScriptLevel)
- # <1+> 5/25/93 NAGA Adding header and porting old files to follow new standards
- #
- # ****************************************************************************
- #
-
-
-
- ########################################################################
- # External libraries
- #=======================================================================
- Libraries "Output.Lib", "DoTasks.Lib","Draw.Lib","StandardFile.Lib","DA.Lib","UserInterface.Lib", "Font.Lib", "Globals.Lib", "LaunchQuit.Lib", "TCS.Lib";
-
-
- #########################################################################
- ######## Application Specific Tasks
- #########################################################################
-
- #########################################################################
- # doReport(reportName,section)
- #========================================================================
- # Author: Jon Marsh x2 8093
- # Description: Display report, close windows
- # Parameters: reportName: menuItem name
- # section: "open","close","both"
- # Returns: Nothing
- # Examples: doReport("Income & Expense", "open");
- # Assumptions: All other windows are closed.
- # Applications: Quicken
- #========================================================================
- # History:
- #
- ########################################################################
- task doReport(reportName,section:= "both") begin
- if section <> "close" begin
- SelectMenuItem(reportName, "Business", "Reports");
- wait(1);
- SelectButton('OK');
- end;
- wait(3);
- if section <> "open" begin
- close [window o:1 t:?title c:true]!; # CloseWindow has some trouble
- LogStr("Selected the close box on window titled '{title}'");
- close [window o:1 t:?title c:true]!;
- LogStr("Selected the close box on window titled '{title}'");
- end;
- end;
-
-
- #########################################################################
- # Views()
- #========================================================================
- # Author: Jon Marsh x2 8093
- # Description: Change views.
- # Parameters: None
- # Returns: Nothing
- # Examples: Views();
- # Assumptions: None
- # Applications: Quicken
- #========================================================================
- # History:
- #
- ########################################################################
- task Views() begin
- LogStr( "Changing Views");
- doReport("A/P by Vendor");
- doReport("Balance Sheet");
- doReport("Cash Flow");
- doReport("Income Statement");
- doReport("Itemized Categories");
- doReport("Job/Project");
- doReport("Reconciliation");
- doReport("Transaction Summary");
- doReport("Transaction Detail");
-
- SelectMenuItem("Category & Transfer List", "ShortCuts");
- CloseWindow(,,1);
- SelectMenuItem("BillMinder", "Options");
- CloseWindow(,,1);
- SelectMenuItem("Account List", "Accounts");
- CloseWindow(,,1);
- end;
-
- #########################################################################
- # QuickenCategories()
- #========================================================================
- # Author: Jon Marsh x2 8093
- # Description: Set up some Categories
- # Parameters: None
- # Returns: Nothing
- # Examples: QuickenCategories();
- # Assumptions: None
- # Applications: Quicken
- #========================================================================
- # History:
- #
- ########################################################################
- task QuickenCategories() begin
- LogStr( "Setting up Categories...");
- SelectMenuItem("Set Up Categories", "ShortCuts"); #To set up new categories
-
- TypeList({"Cash Bonus","For outstanding work"},2);
- SpecialKey(enterKey, 'Enter Key'); #To go to next card
-
- TypeList({"Incentives","Carrots/Sticks"},2);
- SpecialKey(enterKey, 'Enter Key'); #To go to next card
-
- TypeList({"Bribes","Overseas work?","",""},2);
- ScrapBook(global kScrapTEXT); #Paste some text into desc.
- SpecialKey(enterKey, 'Enter Key'); #To finish setting up categories
-
- CloseWindow(,,1);
- end;
-
- #########################################################################
- # QuickenDeposits()
- #========================================================================
- # Author: Jon Marsh x2 8093
- # Description: Deposit some income
- # Parameters: None
- # Returns: Nothing
- # Examples: QuickenDeposits();
- # Assumptions: None
- # Applications: Quicken
- #========================================================================
- # History:
- #
- ########################################################################
- task QuickenDeposits() begin
- LogStr( "Making Deposits...");
- SelectMenuItem("Register", "Account"); #To add a deposit to account
-
- TypeList({ "", "", "Sales", "", "100000",
- "A good day at the store!", "Gross Sales"
- }, 2);
- SpecialKey(enterKey, "Enter Key"); #To enter item and go to next card
-
- TypeList({ "", "", "Found on Street", "", "10000",
- "Lucky Me!", "Interest Earned"
- }, 2);
- SpecialKey(enterKey, "Enter Key"); #To enter item and go to next card
-
- end;
-
- #########################################################################
- # QuickenChecks()
- #========================================================================
- # Author: Jon Marsh x2 8093
- # Description: Write some sample checks
- # Parameters: None
- # Returns: None
- # Examples: QuickenChecks();
- # Assumptions: None
- # Applications: Quicken
- #========================================================================
- # History:
- #
- ########################################################################
- task QuickenChecks() begin
- LogStr( "Writing checks...");
- SelectMenuItem("Write Checks", "Accounts"); #To write a check to account
-
- #To write a check!
- TypeList({ "",
- "Sandy Tompkins", "1000",
- "746 SandyKins Ln.",
- "Santa Cruz, CA",
- " 94758",
- " USA",
- "",
- "Because she deserves it!",
- "Benefits" }, 2);
- SpecialKey(enterKey, "Enter Key"); #To go to next check
-
- TypeList({ "",
- "Joe the Janitor", "10000",
- "8475 Long Road",
- "Homeville, CO",
- " 48957",
- "",
- "Bonus!" }, 2);
-
- SelectMenuItem("Edit Splits", "Edit");
- TypeList({ "(Waste of money)", "Benefits", "2000",
- "(More Like It!)", "Janitorial" }, 2);
- SpecialKey(enterKey, "Enter Key"); #To go to next check
- SelectMenuItem("Close Splits", "Edit");
-
- TypeList({ "",
- "Big Bang Team", "20000",
- "Cupertino Somewhere",
- "",
- "Because we're great!",
- "Incentives" }, 2);
- SpecialKey(enterKey, "Enter Key"); #To go to next check
-
- CloseWindow(,,1); #To dismiss dialog box
- end;
-
- ################################################################################
- #################### Main Script ####################
- ################################################################################
- script Quicken (ScriptLevel:= -1)
- begin
- InitGlobals(ScriptLevel);
- InitDraw();
- InitFonts();
- global gAppTitle := 'Quicken';
- global gAppVersion := '3'; # version of app you will be running
- global gFileName := "@!@-{gBuildVers}-{gAppTitle}"; #This is used in SaveAs when saving files
- SuiteStart('Quicken.vu'); # begin a new test suite
- if LaunchTwitch("{gAppTitle}",gAliasDirectory) # launch or twitch to your app
- begin
- gCustomRetrievedDoc := [window o:1 t:'First InterBank: Register'];
- (*
- *)
- If (match[button t:'Cancel']!)
- SelectButton('Cancel');
- SelectMenuItem('New', 'File');
- if(match[checkbox t:'Home']!) # Check to see if this is the 1st run
- begin
- SaveAs(gFileName); #To test SF_Put
- wait(2);
- SelectButton('Cancel');
- end;
- DoSetUpApp('Cancel',0,,'New File',,,0);
-
- SelectCheckBox("Home");
- SelectCheckBox("Business");
- SaveAs(gFileName); #To test SF_Put
- ourLastSavedFile := global gLastSavedFile;
- wait(10);
-
- TypeList({"First InterBank", "10000"},2); #Set up new Account
- SpecialKey(returnKey, 'Return Key'); #To Select the Default-'Continue'
-
- CloseWindow(); #To test the Close box - only closes window
- SelectMenuItem("New", "File"); # Close this doc by creating a new one.
- SelectButton("New File");
- SelectCheckBox("Home");
- SaveAs("@!@-QuickenJunk");
- wait(5);
- SelectButton("Cancel");
-
- OpenFile(ourLastSavedFile); #To Test SF_Get will open file
-
- QuickenCategories(); # Includes ScrapText
- QuickenDeposits();
-
- QuickenChecks();
-
- doReport("Transaction Detail", "open"); #To go to a scrollable window
-
- DoWindow();
-
- doReport("Transaction Detail", "close");
-
- Views(); # Change views
-
- SelectMenuItem("Save A Copy", "File");
- SelectButton("OK");
- SaveAs(gFileName,0);
-
- DoCloseApp(-1,1,,,1);
-
- LogStr("############################# LIMITATIONS: ############################");
- LogStr("Note: No Graphic Tools to test in Quicken");
- LogStr("Note: No Font Menus to test in Quicken");
- LogStr("Note: Quicken does not accept graphic from scrapbook");
- LogStr("Note: Quicken does not have a revert function");
-
- end; # if LaunchTwitch("{gAppTitle}",gAliasDirectory)
- SuiteEnd();
- end; # script Quicken
-